<?php
require 'include/global.php';              
require_once 'include/train_db.php';
$smarty->compile_check = true;
$sql = "SELECT * FROM pa_skypechat WHERE sp_id = '".$_GET[id]."' ";
$s   = $DB->fetch_one_array($sql);
   $s[fromhour] = @substr($s[sp_starttime ],0,2);$s[frommin] = @substr($s[sp_starttime],2,2);
   $s[tohour] = @substr($s[sp_endtime],0,2);$s[tomin] = @substr($s[sp_endtime],2,2);
   $s[page1] = (@ereg('1',$s['sp_selectpage']))?1:0;
   $s[page2] = (@ereg('2',$s['sp_selectpage']))?1:0;
   $s[page3] = (@ereg('3',$s['sp_selectpage']))?1:0;
   $s[page4] = (@ereg('4',$s['sp_selectpage']))?1:0;

$smarty->assign("s",$s);

$smarty->display('chatdetail.tpl');

?>
